import Vue from 'vue'
import VueRouter, { RouteConfig } from 'vue-router'
// import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes: Array<RouteConfig> = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    name: 'home',
    component: () => import('../components/MainMenu.vue'),
    children: [
      {
        path: '/',
        redirect: '/MessageOpen'
      },
      {
        path: '/MessageOpen',
        name: 'MessageOpen',
        component: () => import('../views/MessageOpen.vue'),
        children: [
          {
            path: '/',
            redirect: '/Competition'
          },
          {
            path: '/Competition',
            name: 'Competition',
            component: () => import('../views/MessageOpen/CompetitionInformation.vue')
          }
        ],
      },
      {
        path: '/IdeologyAndMorality',
        name: 'IdeologyAndMorality',
        component: () => import('../views/IdeologyAndMorality.vue'),
        children: [
          {
            path: '/',
            redirect: '/MutualEvaluation'
          },
          {
            path: '/MutualEvaluation',
            name: 'MutualEvaluation',
            component: () => import('../views/IdeologyAndMorality/MutualEvaluation.vue')
          },
          {
            path: '/MinusPoint',
            name: 'MinusPoint',
            component: () => import('../views/IdeologyAndMorality/MinusPoints.vue')
          },
          {
            path: '/BonusPoint',
            name: 'BonusPoint',
            component: () => import('../views/IdeologyAndMorality/BonusPoints.vue')
          }
        ]
      },
      {
        path: '/ProfessionalTheory',
        name: 'ProfessionalTheory',
        component: () => import('../views/ProfessionalTheory.vue'),
      },
      {
        path: '/ComprehensivePractice',
        name: 'ComprehensivePractice',
        component: () => import('../views/ComprehensivePractice.vue')
      },
      {
        path: '/InnovationAndEntrepreneurshipAbility',
        name: 'InnovationAndEntrepreneurshipAbility',
        component: () => import('../views/InnovationAndEntrepreneurshipAbility.vue'),
      },
      {
        path: '/ParticipantComponents',
        name: 'ParticipantComponents',
        component: () => import('../views/InnovationAndEntrepreneurshipAbility/ParticipantComponents.vue'),
        children: [
          {
            path: '/',
            redirect: '/CoreJournals'
          },
          {
            path: '/CoreJournals',
            name: 'CoreJournals',
            component: () => import('../views/InnovationAndEntrepreneurshipAbility/ParticipantComponents/CoreJournals.vue')
          }
        ]
      },
      {
        path: '/OrganizerComponent',
        name: 'OrganizerComponent',
        component: () => import('../views/InnovationAndEntrepreneurshipAbility/OrganizerComponent.vue'),
        children: [
          {
            path: '/',
            redirect: '/CoreJournals'
          },
          {
            path: '/CoreJournals',
            name: 'CoreJournals',
            component: () => import('../views/InnovationAndEntrepreneurshipAbility/OrganizerComponent/CoreJournals.vue')
          }
        ]
      }
    ]
  },
  {
    path: '*',
    redirect: '/'
  },
  {
    path: '/e',
    component: () => import('../views/AboutView.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
